package util;

import java.io.File;

public class GAConfig {
	   public static final int PopulationSize=100;
       public static final int TestCaseSize = 80;      
       public static final int elitismNumBest=10;      
       //Random Testing 
       public static final int TestCaseRandomSize =200; 
       public static final int ArraySize=25;
       public static final int String_length=15;

public  static final float       crossover_rate=0.80f;
public  static  float       mutation_rate=0.01f;
public  static final float SET_TO_NULL = 0.1f;
public  static final double p_statement_insertion= 0.5f;
//public  static final String immigrationStrategy="immigration.ElitismBasedImmigration";


public final static int NumVarCut=2;
//Debugging
public final static boolean public_only = false;
public final static boolean DEBUG = false;
public final static boolean Silent = false;
public static final boolean SaveData=true;
public static final boolean CreateTestCases=true;
//
public final static boolean use_tf_idf = false;


public static  boolean TargetHitBranches=false; 
public static  boolean IsSearchStaganated=false;

public final static boolean Use_Immigration = false;
public final static boolean Use_Elitism_based_Immigrants=false;


public static  boolean UseReadWrietRelation=true; 
public static  boolean randomInitialPopulation=true; 
public static  boolean Seeding=false; 
public static  boolean SeedingCreatedObject=false; 


/** the base directory (e.g. $HOME/workspace/project/ ) */
private static File dirBase;

/** source directory */
private static File dirSource;

/** directory with classes compiled by the user */
private static File dirCompiled;

/** directory with classes instrumented */
private static File dirInstrumented;
private static File dirGeneratedTests;
private static File dirLogFiles;


//public  String		classFilePath="/scratch/workspace/Experimentalsubjects/SingleClasses/src/Foo/Foo.txt";
//public  String		classFilePath="/scratch/workspace/Experimentalsubjects/SingleClasses/src/CoinBox/CoinBox.txt";

 //public  static String		classFilePath="/scratch/workspace/Experimentalsubjects/SingleClasses/src/Stack/Stack.txt";//StringTokenizer
//public  static String		classFilePath="/scratch/workspace/Experimentalsubjects/lang3/CUT.txt";//StringTokenizer
//public  static String		classFilePath="/scratch/workspace/Experimentalsubjects/SingleClasses/src/Fraction/Fraction.txt";//StringTokenizer
//public  String		classFilePath="/scratch/workspace/Experimentalsubjects/SingleClasses/src/StringTokenizer/CUT.txt";

public  static String		classFilePath="/scratch/workspace/Experimentalsubjects/jdom2/CUT.txt";
//public  static String		    classFilePath="/scratch/workspace/Experimentalsubjects/JodaTime/CUT.txt";

//public  static String		    classFilePath="/scratch/workspace/Experimentalsubjects/NanoXML/CUT.txt";

//public static String		classFilePath="/scratch/workspace/Experimentalsubjects/roops/CUT.txt";

//public static String		classFilePath="/scratch/workspace/Experimentalsubjects/lang3/CUT.txt";

//public  static String		classFilePath="/scratch/workspace/Experimentalsubjects/Conzilla/CUT.txt";
//public  static String		classFilePath="/scratch/workspace/Experimentalsubjects/commons/CUT.txt";
//public  static String		classFilePath="/scratch/workspace/Experimentalsubjects/commons-cli/CUT.txt";

public static void ConfigProject() {
	dirBase = new File(".");
	dirSource = new File("src");
	dirCompiled = new File("bin");
	dirInstrumented = new File("instrumented");
	dirGeneratedTests = new File("testcases");
	dirLogFiles = new File("logFiles");

}
public static File getDirCompiled() {
	ConfigProject();
	if(!dirCompiled.isAbsolute()) dirCompiled = new File(dirBase, dirCompiled.getPath()).getAbsoluteFile();
	return dirCompiled;
}

public static File getDirInstrumented() {
	ConfigProject();
	dirInstrumented = new File(dirBase, dirInstrumented.getPath()).getAbsoluteFile();
	return dirInstrumented;
}
public static File getDirGeneratedTests() {
    ConfigProject();
    dirGeneratedTests = new File(dirBase, dirGeneratedTests.getPath()).getAbsoluteFile();
    return dirGeneratedTests;
}
public static File getLogFiles() {
    ConfigProject();
    dirLogFiles = new File(dirBase, dirLogFiles.getPath()).getAbsoluteFile();
    return dirLogFiles;
}
}
